xiaoming = {
    "name": "张三",
    "age": "11",
    "height": 123123
}

print(xiaoming)

# 判断值存不存在
print("name" in xiaoming)

# 取值
print("取值", xiaoming["name"])

# print("取值", xiaoming["name123123"])
# 增加/修改
xiaoming["age"] = 18
xiaoming["name111"] = 181

print(xiaoming)
# 删除
xiaoming.pop("name")
print(xiaoming)

# 键值对的数量
print(len(xiaoming))

# 合并字典
tem_dic = {"name1111111": "dasdasdsd123123"}
xiaoming.update(tem_dic)
print("update:", xiaoming)

# 清空字典
# xiaoming.clear()
# print("clear:", xiaoming)

# 循环遍历
for key in xiaoming:
    print(" (%s, %s)" % (key, xiaoming[key]))
